<!DOCTYPE html>
<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script>

  var API_KEY = '';
  var query = [{'type':'/music/album','id':null,'name':null}];

  function OnLoadCallback() {
  	gapi.client.setApiKey(API_KEY);
  	gapi.client.load('freebase', 'v1', function(){
  		var request = gapi.client.freebase.mqlread({'query': JSON.stringify(query)});
		request.execute(function(response) {
			var results = JSON.parse(response)['result'];
			$.each(results, function(i, topic) {
			  $('<div>', {text:topic['name']}).appendTo(document.body);
			});
		});
  	});
  }
</script>
    <script src="https://apis.google.com/js/client.js?onload=OnLoadCallback"></script>
</head>
<body>

</body>
</htm>
